package cn.itcast.itcaststore.serive;

import cn.itcast.itcaststore.domain.User;
import cn.itcast.itcaststore.exception.ActiveUserException;
import cn.itcast.itcaststore.exception.LoginException;
import cn.itcast.itcaststore.exception.RegisterException;

public interface UserService {

    /**
     * 注册操作
     * @param user
     * @throws RegisterException
     */
    void register(User user) throws RegisterException;


    /**
     * 登录操作
     * @param username
     * @param password
     * @return
     * @throws LoginException
     */
    User login(String username,String password) throws LoginException;
    /*
    * 激活用户
    * */
    int activeUser(String activeCode) throws ActiveUserException;
}
